<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/**
<span class='line'>  2</span>  * 窗体控件FDWindow,继承自&lt;a href="FDPanel.html">FDPanel&lt;/a>&lt;br>
<span class='line'>  3</span>  * @example 示例:
<span class='line'>  4</span> tip = FDLib.getEl('tip');
<span class='line'>  5</span> win = new FDWindow({
<span class='line'>  6</span> 	contentId:'win'
<span class='line'>  7</span> 	,title:'标题'
<span class='line'>  8</span> 	,modal:false
<span class='line'>  9</span> 	,afterShow:function(){tip.innerHTML = 'afterShow'}
<span class='line'> 10</span> 	,afterClose:function(){tip.innerHTML = 'afterClose'} 
<span class='line'> 11</span> });
<span class='line'> 12</span> win3 = new FDWindow({
<span class='line'> 13</span> 	contentId:'win3'
<span class='line'> 14</span> 	,title:'标题3'
<span class='line'> 15</span> });
<span class='line'> 16</span> 
<span class='line'> 17</span> var win2 = new FDWindow({domId:'win2',width:'200px',modal:false,dragable:false,title:'无法拖动,无法关闭的标题',closeable:false});
<span class='line'> 18</span> win2.moveTo(100,100);
<span class='line'> 19</span> win2.show();
<span class='line'> 20</span>  * @param options 参见{@link #getOptions}返回的对象
<span class='line'> 21</span>  * @constructor
<span class='line'> 22</span>  * 2012-8-8
<span class='line'> 23</span>  */</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">FDWindow</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">options</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">	</span><span class="NAME">FDWindow.superclass.constructor.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">	</span><span class="NAME">FDLib.implement</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="NAME">FDControl</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 28</span> 
<span class='line'> 29</span> </span><span class="NAME">FDLib.extend</span><span class="PUNC">(</span><span class="NAME">FDWindow</span><span class="PUNC">,</span><span class="NAME">FDPanel</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 30</span> 
<span class='line'> 31</span> </span><span class="COMM">/**
<span class='line'> 32</span>  * 默认属性,继承&lt;a href="FDPanel.html">FDPanel&lt;/a>的属性并添加自身属性
<span class='line'> 33</span>  * @example &lt;pre>&lt;code>
<span class='line'> 34</span> {
<span class='line'> 35</span> 	domId:''
<span class='line'> 36</span> 	// 标题 
<span class='line'> 37</span> 	,title:''
<span class='line'> 38</span> 	// 按钮,参考FDButton
<span class='line'> 39</span> 	,buttons:[]
<span class='line'> 40</span> 	// 视图层类 
<span class='line'> 41</span> 	,view:FDWindowView
<span class='line'> 42</span> 	// 是否显示右上角关闭按钮 
<span class='line'> 43</span> 	,closeable:true
<span class='line'> 44</span> 	// 能否拖拽窗体 
<span class='line'> 45</span> 	,dragable:true
<span class='line'> 46</span> 	// 是否显示遮罩层 
<span class='line'> 47</span> 	,modal:true
<span class='line'> 48</span> 	// 打开窗体后执行的方法 
<span class='line'> 49</span> 	,afterShow:null
<span class='line'> 50</span> 	// 关闭窗体后执行的方法 
<span class='line'> 51</span> 	,afterClose:null
<span class='line'> 52</span> 	// 是否立即显示
<span class='line'> 53</span> 	,isLoadShow:false
<span class='line'> 54</span> }&lt;/code>&lt;/pre>
<span class='line'> 55</span>  */</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="COMM">//@override</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="NAME">FDWindow.prototype.getOptions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">options</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">FDWindow.superclass.getOptions.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">FDLib.util.apply</span><span class="PUNC">(</span><span class="NAME">options</span><span class="PUNC">,</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">		</span><span class="NAME">domId</span><span class="PUNC">:</span><span class="STRN">''</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">		</span><span class="COMM">/** 标题 */</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">title</span><span class="PUNC">:</span><span class="STRN">''</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">		</span><span class="COMM">/** 按钮 */</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">buttons</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">		</span><span class="COMM">/** 视图层类 */</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">view</span><span class="PUNC">:</span><span class="NAME">FDWindowDomView</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">		</span><span class="COMM">/** 是否显示右上角关闭按钮 */</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">closeable</span><span class="PUNC">:</span><span class="KEYW">true</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">		</span><span class="COMM">/** 能否拖拽窗体 */</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">dragable</span><span class="PUNC">:</span><span class="KEYW">true</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">		</span><span class="COMM">/** 是否显示遮罩层 */</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">modal</span><span class="PUNC">:</span><span class="KEYW">true</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">		</span><span class="COMM">/** 打开窗体后执行的方法 */</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">afterShow</span><span class="PUNC">:</span><span class="KEYW">null</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">		</span><span class="COMM">/** 关闭窗体后执行的方法 */</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">afterClose</span><span class="PUNC">:</span><span class="KEYW">null</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">		</span><span class="COMM">/** 是否立即显示 */</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">isLoadShow</span><span class="PUNC">:</span><span class="KEYW">false</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 81</span> 
<span class='line'> 82</span> </span><span class="COMM">/**
<span class='line'> 83</span>  * 返回按钮
<span class='line'> 84</span>  * @return 返回按钮集合,数组形式,每个元素都是FDButton对象
<span class='line'> 85</span>  */</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="NAME">FDWindow.prototype.getButtons</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.options.buttons</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 89</span> 
<span class='line'> 90</span> </span><span class="COMM">/**
<span class='line'> 91</span>  * 移动到中央
<span class='line'> 92</span>  */</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="NAME">FDWindow.prototype.moveToCenter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">	</span><span class="NAME">this.viewInstance.moveToCenter</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 96</span> 
<span class='line'> 97</span> </span><span class="COMM">/**
<span class='line'> 98</span>  * 移动窗体
<span class='line'> 99</span>  * @param left 距离页面左边的距离,int类型
<span class='line'>100</span>  * @param top 距离页面顶部的距离,int类型
<span class='line'>101</span>  */</span><span class="WHIT">
<span class='line'>102</span> </span><span class="NAME">FDWindow.prototype.moveTo</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">left</span><span class="PUNC">,</span><span class="NAME">top</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">	</span><span class="NAME">this.viewInstance.moveTo</span><span class="PUNC">(</span><span class="NAME">left</span><span class="PUNC">,</span><span class="NAME">top</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>104</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>105</span> 
<span class='line'>106</span> </span><span class="COMM">/*------------------------------------confirm------------------------------------*/</span><span class="WHIT">
<span class='line'>107</span> </span><span class="COMM">/**
<span class='line'>108</span>  * 确认框,功能类似于window.confirm()
<span class='line'>109</span>  * @param content 窗口内容
<span class='line'>110</span>  * @param callback 回调函数,即点击确定后需要执行的函数
<span class='line'>111</span>  * @param options FDWindow的options参数
<span class='line'>112</span>  * @example 示例:
<span class='line'>113</span> &lt;pre>
<span class='line'>114</span> FDWindow.confirm('确定关闭吗?',function(r){
<span class='line'>115</span> 	if(r){
<span class='line'>116</span> 		alert('确定')
<span class='line'>117</span> 	}else{
<span class='line'>118</span> 		alert('取消')
<span class='line'>119</span> 	}
<span class='line'>120</span> }); 
<span class='line'>121</span> &lt;/pre>
<span class='line'>122</span>  */</span><span class="WHIT">
<span class='line'>123</span> </span><span class="NAME">FDWindow.confirm</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>124</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">contentId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">buildWindowHtml</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">okBtn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">FDButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">text</span><span class="PUNC">:</span><span class="STRN">'确定'</span><span class="PUNC">,</span><span class="NAME">onclick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">		</span><span class="NAME">_callback</span><span class="PUNC">(</span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.close</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">noBtn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">FDButton</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">text</span><span class="PUNC">:</span><span class="STRN">'取消'</span><span class="PUNC">,</span><span class="NAME">onclick</span><span class="PUNC">:</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">		</span><span class="NAME">_callback</span><span class="PUNC">(</span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.close</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">confirmWin</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">FDWindow</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">		</span><span class="NAME">contentId</span><span class="PUNC">:</span><span class="NAME">contentId</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">closeable</span><span class="PUNC">:</span><span class="KEYW">false</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">buttons</span><span class="PUNC">:</span><span class="PUNC">[</span><span class="NAME">okBtn</span><span class="PUNC">,</span><span class="NAME">noBtn</span><span class="PUNC">]</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_callback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">def</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">		</span><span class="NAME">title</span><span class="PUNC">:</span><span class="STRN">'提示'</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">width</span><span class="PUNC">:</span><span class="STRN">'220px'</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">yesText</span><span class="PUNC">:</span><span class="STRN">"确定"</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">		</span><span class="PUNC">,</span><span class="NAME">noText</span><span class="PUNC">:</span><span class="STRN">"取消"</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">content</span><span class="PUNC">,</span><span class="NAME">callback</span><span class="PUNC">,</span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">defOpt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">FDLib.util.clone</span><span class="PUNC">(</span><span class="NAME">def</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">		</span><span class="NAME">options</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">FDLib.util.apply</span><span class="PUNC">(</span><span class="NAME">defOpt</span><span class="PUNC">,</span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">		</span><span class="NAME">initWindow</span><span class="PUNC">(</span><span class="NAME">content</span><span class="PUNC">,</span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">		</span><span class="NAME">setButtonEvent</span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.show</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">	</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">initWindow</span><span class="PUNC">(</span><span class="NAME">content</span><span class="PUNC">,</span><span class="NAME">options</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.setTitle</span><span class="PUNC">(</span><span class="NAME">options.title</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.setContent</span><span class="PUNC">(</span><span class="NAME">content</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.setWidth</span><span class="PUNC">(</span><span class="NAME">options.width</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">		</span><span class="NAME">confirmWin.setHeight</span><span class="PUNC">(</span><span class="NAME">options.height</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">		</span><span class="NAME">okBtn.setText</span><span class="PUNC">(</span><span class="NAME">options.yesText</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">		</span><span class="NAME">noBtn.setText</span><span class="PUNC">(</span><span class="NAME">options.noText</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>172</span> </span><span class="WHIT">	</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">setButtonEvent</span><span class="PUNC">(</span><span class="NAME">callback</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">		</span><span class="NAME">_callback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">callback</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">	</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">buildWindowHtml</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">div</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="NAME">FDTag.DIV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"confirmWin_"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">FDControl.generateCount</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">		</span><span class="NAME">div.setAttribute</span><span class="PUNC">(</span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="NAME">id</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">		</span><span class="NAME">document.body.appendChild</span><span class="PUNC">(</span><span class="NAME">div</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>183</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span></pre></body></html>